const state = {
  loading: false
}

const mutations = {
  SET_LOADING(state, flag) {
    state.loading = flag
  }
}

const actions = {
  toggleLoading({ commit }, flag) {
    commit('SET_LOADING', flag)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
